package ch.unisi.inf.editor;

import ch.unisi.inf.engine.Image;

/**
 * this filter makes the image lighter.
 * 
 * @author matthias.eberli@lu.unisi.ch
 */
public class LighterFilter extends Filter
{
	
	public LighterFilter(final String name)
    {
        super(name);
	}

    public void apply(final Image image)
    {
        final int height = image.getHeight();
        final int width = image.getWidth();
        for(int y = 0; y < height; y++) {
            for(int x = 0; x < width; x++) {
                image.setPixel(x, y, image.getPixel(x, y).brighter());
            }
        }
    }
}
